import { $request } from "../../utils/request";

// 获取抽奖列表
export function getLotteryInfo() {
  return $request("kpComment/getLotteryInfo", "POST", {
    lotteryId: '1',
  });
}
// 获取抽奖详情
export function getLotteryDetail({lotteryId}) {
  return $request("/kpComment/getLotteryInfoById", "POST", {
    lotteryId,
  });
}

// 参与抽奖
export function saveLotteryInfo({lotteryId}) {
  // const now = new Date()
  // const hours = now.getHours()
  // const minutes = now.getMinutes()
  // const add0 = (num) => num>9?num:'0'+ String(num)
  // const time = `${add0(hours)}:${add0(minutes)}`
  return $request("kpComment/saveLotteryInfo", "POST", {
    // lotteryId: '1',
    lotteryId,
    // time,
  });
}

